extends Spatial

onready var spot = $item_spot
onready var sprite = $item_spot/sprite
var item = null
var at_window = false

func _ready():
	pass # Replace with function body.

func place_item(item_arg, inventory):
	if item:
		if inventory: inventory.gain_item(item.definition)
		item = null
		sprite.texture = null
	if item_arg:
		if inventory: inventory.lose_item(item_arg.definition.id)
		item = item_arg
		sprite.texture = item.definition.icon()
		
		
